package com.example.controll.yijieControll;

import com.example.config.R;
import com.example.domain.yijie;
import com.example.service.yijie.yijieService;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/yijie")
public class yijieControll {

    @Resource
    private yijieService yijieService;

    @RequestMapping("/select")
    private R insert(yijie yijie){
        System.out.println("aaaa");
        System.out.println(yijie.getUseropenid());
        String openid ="'"+yijie.getUseropenid()+"'";
        System.out.println(yijieService.findLease(openid));
        return new R(true,yijieService.findLease(openid));
    }

    @RequestMapping("/select1")
    private R insert1(yijie yijie){

        String openid ="'"+yijie.getUseropenid()+"'";

        return new R(true,yijieService.findLease1(openid));
    }

    @RequestMapping("/findcomment")
    private R findcomment(yijie yijie){
        System.out.println(yijie.getUseropenid());
        String openid = "'"+yijie.getUseropenid()+"'";
//        String openid = yijie.getUseropenid();
        return new R(true,yijieService.findcomment(openid));
    }



}
